package org.bedracket.event;

import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;

public class EntityItemTickEvent extends EntityEvent {

    private static final HandlerList handlers = new HandlerList();

    private final World world;

    public EntityItemTickEvent(Entity what, World world) {
        super(what);
        this.world = world;
    }

    @Override
    public Entity getEntity() {
        return (Item) super.getEntity();
    }

    @Override
    public HandlerList getHandlers() {
        return handlers;
    }

    public World getWorld() {
        return world;
    }

    public static class Before extends EntityItemTickEvent {

        public Before(Entity what, World world) {
            super(what, world);
        }
    }

    public static class After extends EntityItemTickEvent {

        public After(Entity what, World world) {
            super(what, world);
        }
    }
}
